1. Field of the Invention
The present invention relates to color processing for mapping image data of the first device into the gamut of the second device.
2. Description of the Related Art
Recently, a system has become popular which inputs an image by an image input device such as a digital camera, color scanner, or the like, displays and confirms the image by using an image display device such as a CRT, LCD, or the like, and outputs the image by an image output device such as a color printer or the like. Such a system performs color matching in order to absorb differences in color appearance caused by differences between a gamut (to be referred to as an “input gamut” hereinafter) of a color space on which the image input device records an image and a gamut (to be referred to as an “output gamut” hereinafter) of the image display device or image output device. More specifically, the system performs color matching to execute gamut mapping and correct differences in color appearance between the devices.
Various methods of gamut mapping have been proposed. Particularly, when performing gamut mapping to a photo image, a mapping method of preserving the tone of the photo image is used.
FIGS. 1 and 2 are views showing examples of cross sections (LC planes) of an input gamut and output gamut on a given hue H in a CIELAB space.
FIG. 1 shows the following method. In each hue plane, a maximum saturation Cinmax for each lightness value L of the input gamut is mapped to a maximum saturation Coutmax of the corresponding lightness value L of the output gamut. The color inside the gamut is mapped to a color of the output gamut having a ratio Cout/Coutmax which corresponds to the saturation ratio Cin/Cinmax of the color to be mapped.
FIG. 2 shows a mapping method of storing a color of the input gamut without any change if the color has a saturation of a predetermined ratio x % of the maximum saturation of the output gamut. If the color has a larger saturation than the predetermined one, it is compressed into the remaining part, i.e., (100−x)%, of the output gamut.
When the gamut mapping method described above is used, the tone reproduced in the input gamut can be generally reproduced in the output gamut. However, when a difference between the saturation values of the input gamut and output gamut is very large, the saturation after mapping greatly decreases as compared to that before mapping in the former mapping method. In the latter mapping method, most tone differences in the compressed part (high saturation part) are lost.
An image input device represented by a digital camera records an image as image data in a color space such as a sRGB color space. However, it does not use the whole gamut of the sRGB color space, i.e., the whole input gamut. This is due to internal arithmetic processing of the image input device.
For example, in a case of a digital camera, an internal color conversion parameter is switched in accordance with the sensing situation, and color conversion processing is performed by using the switched parameter. Whatever sensing situation parameter is used to perform color conversion, only a part of the sRGB gamut as the input gamut is used for recording. A gamut used in the input gamut in practice is called as a practical gamut.
FIG. 3 is a view showing an example of the relationship between the input gamut, practical gamut, and output gamut by using an LC plane.
In most mapping methods including the above-described two examples, because a whole input gamut is mapped into an output gamut, even the gamut range which is not used in practice is mapped on the output gamut. As a result, an unnecessary saturation drop or tone loss occurs.
In contrast, in a technique disclosed in Japanese Patent Laid-Open No. 2000-83177, the color distribution of an input image is analyzed and a gamut existing in the input image is mapped into an output gamut. With this technique, no input gamut range unnecessary for mapping is mapped into the output gamut, and a saturation drop or tone loss can be prevented. However, since this technique changes the mapping (degree of compression) in accordance with the color distribution of the input image, the color of the object may be changed depending on the background color.